package info.techgeek.labs.patterns.strategy.Duck2;
public class SortBySize implements SortStrategy {

	public int sortingAlgorithm(Object f, Object s) {
		DuckSortable o1 = (DuckSortable) f;
		DuckSortable o2 = (DuckSortable) s;
		
		if (o1.getDuckSize() < o2.getDuckSize())	return -1;
		if (o1.getDuckSize() == o2.getDuckSize())	return 0;
		return 1;
	}

}